package com.example.auth.mapper;


import com.example.auth.entity.SysDepartment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysDepartmentMapper {
    /**
     * insert a new department
     *
     * @param sysDepartment department
     * @return the row count effected
     */
    int insert(SysDepartment sysDepartment);

    /**
     * delete a department by primary key
     *
     * @param id ID
     * @return the row count effected, if 0, means no data was deleted
     */
    int deleteByPrimaryKey(Long id);

    /**
     * update a department by primary key
     *
     * @param sysDepartment department to update
     * @return the row count effected, if 0, means no data was updated
     */
    int updateByPrimaryKey(SysDepartment sysDepartment);

    /**
     * get a department by primary key
     *
     * @param id ID
     * @return the department with primary key
     */
    SysDepartment selectByPrimaryKey(Long id);

    /**
     * get departments by condition
     *
     * @param sysDepartment condition
     * @return the list of departments with condition
     */
    List<SysDepartment> selectList(SysDepartment sysDepartment);
}
